<!DOCTYPE html>
<html>
	<head>
	    <meta charset="UTF-8">
	    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
	    <title>发货管理</title>
	    <link href="../css/mui.min.css" rel="stylesheet"/>
	    <link rel="stylesheet" type="text/css" href="../css/pullToRefresh.css" />
	    <link rel="stylesheet" type="text/css" href="../css/app.css"/>
	    <link rel="stylesheet" type="text/css" href="../fonts/iconfont/iconfont.css"/>
	    <link rel="stylesheet" type="text/css" href="../css/global.css"/>
	    <style type="text/css">
	    	.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active{background: transparent;color: #4c968e;border: none;}
	   		.mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar{background: #4c968e;}
	    	.mui-segmented-control.mui-segmented-control-inverted{padding: 6px 0;}
	    </style>
	</head>
	<body ng-app="app" ng-controller="my_controller">
	    <header class="mui-bar mui-bar-nav bg_white">
	        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	        <h1 class="mui-title colorP">发货管理</h1>
	    </header>
		<div class="mui-content">
		    <div class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted bg_white">
		        <a class="mui-control-item mui-active">未发货</a>
		        <a class="mui-control-item">已发货</a>
		        <a class="mui-control-item">已签收</a>
		    </div>
		    <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-4 margin-bottom5px"></div>
		    <div class="mui-slider-group">
		        <div id="item1" class="mui-slider-item mui-control-content mui-active" ng-repeat="(index,vo) in res">		            
		            <ul class="mui-table-view margin-bottom5px bg_white" ng-repeat="(index,val) in vo">
			        	<li class="paddingl_r_15px_tb11px bg_white border-bottom">
			               <div class="user_pic"><img  ng-src="{{val.icon}}" /></div>
							<span class="padding_l line-height30px">{{val.nick}}</span>	
							<span class="mui-pull-right color999" ng-if="val.state == 1">物流配送中...</span>
							<span class="mui-pull-right color999" ng-if="val.state == 2||val.state == 7||val.state == 8 ||val.state == 9">已签收...</span>
			            </li>
			            <li class="mui-table-view-cell mui-media">
			                <a href="javascript:;" ng-click="open_detail(val.id,val.state)">
			                    <img class="mui-media-object mui-pull-left goods_pic "  ng-src="{{val.good_image}}">
			                    <div class="mui-media-body">
			                     	<div class="mui-ellipsis">{{val.trade_name}}</div>
			                     	<div class="mui-clearfix line-height30px"><span class="mui-pull-right colorP font14">工期：<i>{{val.maf_time}}</i>天</span></div>
			                     	<div class="mui-clearfix">
			                     		<span class="mui-pull-left colorRed">￥<i ng-bind="val.money"></i></span>
			                     		<span class="mui-pull-right">x <i ng-bind="val.num"></i></span>			                     		
			                     	</div>
			                    </div>
			                </a>
			            </li>
	                    <li class="mui-table-view-cell"> 
	                        <span class="mui-pull-left">合计：<i ng-bind="val.money * val.num"></i></span>
	                        <button ng-click="send_ddid(val.ddid)" type="button" class="mui-btn mui-btn-blue width20 mui-pull-right" ng-if="val.state == 0">发货</button>
	                    	<button ng-click="query_logistics_info(val.logistics,val.logistics_num)" type="button" class="mui-btn mui-btn-blue width20 mui-pull-right" ng-if="val.state == 1">物流信息</button>
	                    	<button ng-click="withdrawals(val.id,7)" type="button" class="mui-btn mui-btn-blue width20 mui-pull-right" ng-if="val.state == 2">申请提现</button>
	                    	<p class="mui-pull-right color333" ng-if="val.state == 3">退款中...</p>
	                    	<p class="mui-pull-right colorP" ng-if="val.state == 4">退款成功</p>
	                    	<p class="mui-pull-right color_red" ng-if="val.state == 5">退款失败</p>
	                    	<p class="mui-pull-right color333" ng-if="val.state == 7">提现审核中...</p>
	                    	<p class="mui-pull-right colorP" ng-if="val.state == 8">提现成功</p>
	                    	<p class="mui-pull-right color_red" ng-if="val.state == 9">提现失败</p>
	                    </li>			
			        </ul>
			        <!--<p class="mui-text-center line-height44px" ng-if="not_more == 1">没有更多数据~~~</p>-->
			        <div class="mui-text-center line-height44px color999 font14 padding_tb20" ng-if="res[0].length == 0"><i class="iconfont mui-icon font60">&#xe6e3;</i><br />没有更多数据了~~~</div> 
		        </div>
			</div>
			<p class="mui-text-center line-height44px" ng-if="kkk == 1">没有更多数据~~~</p>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/mui.pullToRefresh.js"></script>
	<script src="../js/mui.pullToRefresh.material.js"></script>
	<script src="../js/open.js"></script>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/apppublic.js"></script>
	<script src="../js/angular.js"></script>
	<script src="../js/app/deliver_goods_control.js"></script>
	<script type="text/javascript">
		(function($) {
			//阻尼系数
			var deceleration = mui.os.ios ? 0.003 : 0.0009;
			$('.mui-scroll-wrapper').scroll({
				bounce: false,
				indicators: false, //是否显示滚动条
				deceleration: deceleration
			});

			$.ready(function() {
				//循环初始化所有下拉刷新，上拉加载。
				$.each(document.querySelectorAll('.mui-content'), function(index, pullRefreshEl) {
					$(pullRefreshEl).pullToRefresh({
						down:{
							callback: function() {
								var self = this;
								setTimeout(function() {
									loadNews();
									self.endPullDownToRefresh();
								}, 1000);
							}
						},
						up: {
							callback: function() {
								var self = this;
								getValue();
								setTimeout(function() {
									self.endPullUpToRefresh();
								}, 1000);
							}
						}
					});
				});
			});
		})(mui);
	
		function loadNews() {
			uid = plus.storage.getItem('uid');
			appElement = document.querySelector('[ng-controller=my_controller]');
			$scope = angular.element(appElement).scope();
			res = [];
			cur_page = 1;
			nomore = false;
			$scope.intview();
			$scope.$apply();
		}
		function getValue() {
			uid = plus.storage.getItem('uid');
			appElement = document.querySelector('[ng-controller=my_controller]');
			$scope = angular.element(appElement).scope();			
			$scope.intview();
			$scope.$apply();
		}
	</script>
</html>